package com.lufei.message_system.Data.QuestionVD;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

@Data
@Schema(name = "问题更新DTO")
public class QuestionUpdateDTO {
    @JsonProperty("content")
    @Size(max = 500, message = "问题内容长度不能超过500")
    @Schema(description = "问题内容", example = "你更喜欢哪种活动？")
    private String content;

    @JsonProperty("dimension")
    @Schema(description = "维度", example = "EI",
            allowableValues = {"EI", "SN", "TF", "JP"})
    private String dimension;

    @JsonProperty("optionA")
    @Size(max = 200, message = "选项A长度不能超过200")
    @Schema(description = "选项A文本", example = "参加派对，与很多人交流")
    private String optionA;

    @JsonProperty("optionB")
    @Size(max = 200, message = "选项B长度不能超过200")
    @Schema(description = "选项B文本", example = "独自看书或看电影")
    private String optionB;

    // A选项各维度得分（0-1分）
    @JsonProperty("aEScore")
    @Min(value = 0, message = "得分不能小于0")
    @Max(value = 1, message = "得分不能大于1")
    @Schema(description = "A选项外向(E)得分", example = "1")
    private Integer aEScore;

    @JsonProperty("aIScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项内向(I)得分", example = "0")
    private Integer aIScore;

    @JsonProperty("aSScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项实感(S)得分", example = "0")
    private Integer aSScore;

    @JsonProperty("aNScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项直觉(N)得分", example = "0")
    private Integer aNScore;

    @JsonProperty("aTScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项思考(T)得分", example = "0")
    private Integer aTScore;

    @JsonProperty("aFScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项情感(F)得分", example = "0")
    private Integer aFScore;

    @JsonProperty("aJScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项判断(J)得分", example = "0")
    private Integer aJScore;

    @JsonProperty("aPScore")
    @Min(0) @Max(1)
    @Schema(description = "A选项感知(P)得分", example = "1")
    private Integer aPScore;

    // B选项各维度得分（0-1分）
    @JsonProperty("bEScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项外向(E)得分", example = "1")
    private Integer bEScore;

    @JsonProperty("bIScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项内向(I)得分", example = "0")
    private Integer bIScore;

    @JsonProperty("bSScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项实感(S)得分", example = "0")
    private Integer bSScore;

    @JsonProperty("bNScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项直觉(N)得分", example = "0")
    private Integer bNScore;

    @JsonProperty("bTScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项思考(T)得分", example = "0")
    private Integer bTScore;

    @JsonProperty("bFScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项情感(F)得分", example = "1")
    private Integer bFScore;

    @JsonProperty("bJScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项判断(J)得分", example = "1")
    private Integer bJScore;

    @JsonProperty("bPScore")
    @Min(0) @Max(1)
    @Schema(description = "B选项感知(P)得分", example = "1")
    private Integer bPScore;
}